<link rel='stylesheet' href='/ast/message/message.min.css'>
<script src='/ast/message/message.min.js'></script>
<?php
require('./files/dexpz.php');
if (!isset($array_setting_treefolder)) {
  $array_setting_treefolder = json_encode([]);
  $array_setting_treefolder2 = json_encode([[
    'title' => 'Root', 
    'id' => '/',     
    'children' => [] 
]]);
}else{
  $array_setting_treefolder2 = json_encode([[
    'title' => 'Root', 
    'id' => '/',     
    'children' => json_decode($array_setting_treefolder,true)
]]);
}
?>
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>CloudSumionDisk-V2</title>
  <link rel="icon" href="/ast/logo/logo.ico">
  <link rel="stylesheet" href="/ast/cloudstickdex.css">
  <link rel="stylesheet" href="/ast/fontawe/css/all.css">
  <link rel="stylesheet" href="/yhxplus/stable/authgame/auth1.1.css">
</head>
<style>
  .swal2-input {
    margin: 0 auto;
    display: block;
  }

  .highlight {
    background-color: #d9edf7;
  }
</style>

<body>
  <div id="overlay" style="display: none;"></div>
  <div id="rain-container"></div>
  <div id="particles-js"></div>
  <div class="container">
    <div class="tabs">
      <button class="tab-button active" id="files_seein_all" data-target="filessee">All files</button>
      <button class="tab-button" id="uploadButton" data-target="upload">Upload file</button>
      <button class="tab-button" id="documentsee" data-target="document">Document</button>
      <button class="tab-button" data-target="login">Home</button>
      <button class="tab-button" style="display: none;" data-target="home-list">Home List</button>
      <button class="tab-button" id="cmd-system-id" style="display: none;" data-target="cmd-system">CMD-system</button>
      <button class="tab-button" id="spaceconfig-id" style="display: none;" data-target="spaceconfig">configure space</button>
      <button class="tab-button" id="folderconfig2" style="display: none;" data-target="folderconfig">Folder configuration</button>
      <button class="tab-button" id="vipcenters" style="display: none;" data-target="vipcenter">VIP Center</button>
    </div>
    <div class="content">
    <div class="tab-content" id="vipcenter">
    <div class="vip-container">
    <div class="personal-info">
      <div class="avatar-name">
        <img src="/ast/photo/imagevip.jpg" alt="avatar" class="avatar">
        <span class="name"><?php echo $_COOKIE['user_key2']??'User';?></span>
      </div>
      <div class="vip-status">
        <span class="vip-label">Membership Validity: </span>
        <span class="vip-date"><?php echo $vip_time;?></span>
      </div>
      <?php if($vip_now_status_ok):?>
        <div class="vip-badge">
          <?php endif;?>
          <?php if(!$vip_now_status_ok):?>
      <div style="background-color: #888;" class="vip-badge">
        <?php endif;?>
        <span>VIP</span>
      </div>
    </div>

    <div class="vip-content-container">
      <h2>Benefits of opening a VIP</h2>
      <div class="benefits-container">
        <div class="benefit-card">
          <img src="/ast/photo/downloading.png" alt="Downloading" class="benefit-icon">
          <h3>Downloading</h3>
          <p>Unlimited speeds, ultra-fast downloads, unlimited data</p>
        </div>
        <div class="benefit-card">
          <img src="/ast/photo/uploading.png" alt="Uploading" class="benefit-icon">
          <h3>Uploading</h3>
          <p>Unlimited space, you can play, you can use it at any time, and your mobile phone and PC are pass-through</p>
        </div>
        <div class="benefit-card">
          <img src="/ast/photo/kefu.png" alt="Intelligent customer service" class="benefit-icon">
          <h3>Intelligent customer service</h3>
          <p>24*7H to help you solve problems.Manual guidance! Worry no more!</p>
        </div>
      </div>

      <h2>Ad hoc events</h2>
      <p>Invite new users to register and top up as members, you can get 30% of the earnings, and for some reason, 30% of the earnings will be automatically converted into membership days and credited to your account</p>
      <h2>Redeem code for membership</h2>
      <form id="redeem-form">
        <input type="text" id="redeem-code-cdk" placeholder="Enter the redemption code" required>
        <button id="convertiblecdkgetsvip" type="button">convertible</button>
      </form>
    </div>
  </div>
    </div>

      <div class="tab-content" id="spaceconfig">
        <div>
          <label for="input-space">My shared space</label>
          <input id="input-space" value="<?php echo $websiteurlj_space; ?>" disabled type="text">
          <button onclick="javascript:spaceconfig_copy()">Copy</button>
          <div class="sharedspace-allform">
            <label for="input-space1">Head</label>
            <input type="text" id="input-space1" value="<?php echo $jxcompa_query_result['head'] ?? ''; ?>">
            <label for="input-space2">Title</label>
            <input type="text" id="input-space2" value="<?php echo $jxcompa_query_result['title'] ?? ''; ?>">
            <label for="input-space3">Password</label>
            <input type="text" id="input-space3" value="<?php echo $jxcompa_query_result['password'] ?? ''; ?>">
            <label for="input-space4">IMAGE1</label>
            <input type="text" id="input-space4" value="<?php echo $jxcompa_query_result['bkg1'] ?? ''; ?>">
            <label for="input-space5">IMAGE2</label>
            <input type="text" id="input-space5" value="<?php echo $jxcompa_query_result['bkg2'] ?? ''; ?>">
            <label for="input-space6">Notice</label>
            <textarea name="" id="input-space6"><?php echo $jxcompa_query_result['notice'] ?? ''; ?></textarea>
            <button style="margin-top: 10px;" onclick="javascript:spaceconfig_update()">Update</button>
          </div>
          <div class="sharedspace-allform2">
            <img src="/ast/photo/teach_shared 1.jpg" alt="Demo1">
            <img src="/ast/photo/teach_shared 2.jpg" alt="Demo2">
            <p>The Notice column is an announcement on a line, and the title and content are used between ||separate</p>
          </div>
        </div>
      </div>
      <div class="tab-content" id="cmd-system">
        <div class="cmd">
          <div class="cmd-output" id="cmd-output"></div>
          <div class="cmd-prompt">TUPCC:\></div>
          <input type="text" class="cmd-input" id="cmd-input" placeholder="Please enter the command(Input Help provides command table)...">
        </div>

      </div>
      <div class="tab-content" id="folderconfig">
      <div id="folder-tree-yhloading"></div>
      </div>

      <div class="tab-content" id="home-list">
        <div class="progress-container3">
          <div style="width:<?php echo $nowsizeincapacity; ?>%" class="progress-bar3" id="progressBar_haveused"></div>
        </div>
        <div class="progressText_down" id="progressText_down_center" class="progress-text">Currently used: <?php echo $row['capacityed'] ?>GB/<?php echo $row['capacity'] ?>GB</div>
        <div class="progress-container3">
          <div style="width:<?php echo $nowsizeinrate; ?>%" class="progress-bar3" id="progressBar_haveused"></div>
        </div>
        <div class="progressText_down" id="progressText_down_center" class="progress-text">Traffic used: <?php echo $row['rated'] ?>GB/<?php echo $row['rate'] ?>GB</div>
        <div class="card card-large">
          <div class="card-header">Toolbars and Others</div>
          <div class="content">
          <div onclick="javascript:document.getElementById('folderconfig2').click();" class="content-item">Folder management</div>
            <div onclick="javascript:document.getElementById('vipcenters').click();" class="content-item">VIP Center</div>
            <div onclick="javascript:document.getElementById('cmd-system-id').click()" class="content-item">Type in the command</div>
            <div onclick="javascript:extended_customization()" class="content-item">Customization of shared spaces</div>
            <div onclick="javascript:file_zip_searchorscan()" class="content-item">Read the contents of the archive</div>
            <div onclick="javascript:sessionStorage.removeItem('user');location.href='/logout.php'" class="content-item">Log out</div>
          </div>
        </div>
      </div>
      <div class="tab-content active" id="filessee">
        <input id="inputs_pwdfile2" class="inputs_pwdfile" placeholder="Please enter a file name" type="text">
        <div id="fileInfoContainer2" class="file-info-container2" style="margin-top: 20px;">
          <table id="fileInfoTable2" class="file-info-table">
            <thead>
              <tr>
                <th>Name</th>
                <th>Time</th>
                <th>Operations</th>
                <th>Progress</th>
              </tr>
            </thead>
            <tbody id="fileInfoBody2">
              <tr>
                <?php
                require_once($_SERVER['DOCUMENT_ROOT'] . '/cofd/common.php');
                $sql = "SELECT `id`,`names`,`timei` FROM `files` WHERE `froms` = 'visitor'";
                $result = $conn->query($sql);
                while ($row = $result->fetch_assoc()) {
                  $id_file = encrypt($row['id'], 'E', 'yhsdylpo9342');
                  echo '<tr>';
                  echo '<td>' . $row['names'] . '</td>';
                  echo '<td>' . $row['timei'] . '</td>';
                  echo '<td><button class="download-btn-tbody" data-fileid="' . $id_file . '" data-name="' . $row['names'] . '">Download</button></td>';
                  echo '<td>
                  <div class="progress-container2">
                  <div id="progressBar_' . $id_file . '"  class="progress-bar2"></div>
                  </div>
                        <div class="progressText_down" id="progressText_' . $id_file . '" class="progress-text">0%</div></td>';
                  echo '</tr>';
                }
                $conn->close();
                ?>
              </tr>
            </tbody>
          </table>

        </div>

      </div>
      <div class="tab-content" id="upload">
        <div class="h3_span_tellwhat">
          <h3>1.It is forbidden to upload documents that violate laws and regulations.
            <br>2.If you are not logged in, you cannot upload files larger than 5MB.</br>
            3.Files uploaded without logging in can only be downloaded twice, and we will limit their download speed </br>If you have any further questions, please feel free to contact us </br>Have fun every day! In good shape
          </h3>
        </div>
        <input id="inputs_pwdfile" class="inputs_pwdfile" placeholder="Please enter the extraction code" type="text">
        <div id="fileInfoContainer" style="margin-top: 20px;">
          <table id="fileInfoTable" class="file-info-table" style="display: none;">
            <thead>
              <tr>
                <th>File Name</th>
                <th>File Size</th>
                <th>File Type</th>
              </tr>
            </thead>
            <tbody id="fileInfoBody">
            </tbody>
          </table>
        </div>
        <div class="custom-file-upload">
          <input style="display: none;" type="file" id="fileInput" name="file" />
          <label for="fileInput">
            <span>Select the file</span>
          </label>
        </div>
        <button id="uploadButtons">Start uploading</button>
        <div class="progress-container">
          <div class="progress-bar" id="progressBar"></div>
        </div>
        <p style="color: white;" id="statusText">Waiting for the operation...</p>

      </div>
      <div class="tab-content" id="login">

        <div class="login-container">
          <header id="headery" class="site-title">Login</header>
          <div class="form-container">
            <div class="login-form">
              <input type="text" id="louser" name="account" placeholder="Username" required>
              <input type="password" id="lopass" name="password" placeholder="Key" required>
              <button class="login-btn" onclick="logzc()">Login</button>
            </div>
            <div class="register-form" style="display: none;">
              <input type="text" name="account" id="zcuser" placeholder="Username(4-10 lengths)" required>
              <input type="password" name="password" id="zcpass" placeholder="password(6-12 lengths)" required>
              <div class="captcha-container">
                <input type="text" id="accoutcode" name="yzm" placeholder="authcode" required class="captcha-input">
                <div onclick="createCode()" class="captcha-display"></div>
              </div>
              <input type="text" id="mail" name="mail" placeholder="please enter your address" required class="captcha-input">
              <input type="text" id="mail_code" style="display: none;" name="mail2" placeholder="enter the mail auth code" required class="captcha-input">
              <button type="button" class="captcha-refresh-btn" id="getmail" onclick="createmailCode()">GET Mail Auth Code</button>
              <button class="register-btn" onclick="regzc()">Register</button>
            </div>
          </div>
          <div class="form-toggle">
            <button class="toggle-btn" data-target="login">Login</button>
            <button class="toggle-btn" data-target="register">Register</button>
          </div>
        </div>

      </div>
      <div class="tab-content" id="document">
        <div class="container-docment">
          <div class="whoscontent">
            <img src="/ast/logo/logo.png" alt="">
            <h1 id="section1">Brief analysis</h1>
            <h3>This is our generation project, which can upload and download files normally, and at the same time supports setting extraction codes.Due to the time constraints, we are sorry that there is almost always only one of the following examples</h3>
            </br>
            <h3>We can guarantee that our uploads and downloads are stable and secure, although the speeds are not always very high.</h3>
            </br>
            <h3></h3>
            <p>Based on a comprehensive assessment, we recommend that you choose RainCloud for object storage; therefore, the storage mechanisms we provide only support local storage and RainCloud's object storage.</p>
            <p>By default, we will prioritize the use of local storage, and if the local storage capacity is not enough to support the storage, we will use Nimbus object storage. Note: Non-logged-in users can't use object storage to store files</p>
            <hr>
            <h1 id="section2">Call the API-Pull and Update</h1>
            <h3>You can connect to your own project through the API we provide; For example, remote updates; Of course, if you have strong technical skills.Always remember that we only provide storage services and keep these files as secure as possible so that they cannot be compromised</h3>
            <p>Now, I'll give you some examples of programming language integrations, see Part 3 if you need more security or richness</p>
            <h3>
              Request method: GET </br>
              Parameters: domain, fileid, and pwd [fileid is the file ID, and pwd is the extraction code you set when uploading; If there is no extraction code, it can be left blank or omitted]
              </br> Returned: File data stream </br>
              <p>For example: http://domain/files/?123456789&pwd=123456 </p>
            </h3>
            <h2>Python</h2>
            <div class="code-container">
              <pre><code id="code-block" class="language-python">
import requests
def download_file_fromyh(id,pwd,pathsave): 
    roots = "" #http(s)://domain+/
    url = roots +"files/?"+id + "&pwd=" + pwd
    response = requests.get(url, stream=True)
    if response.status_code == 200:
        file_name = url.split('?')[-1]  
        if 'Content-Disposition' in response.headers:
            content_disposition = response.headers['Content-Disposition']
            file_name = content_disposition.split('filename=')[-1].strip('"')
        with open(pathsave+file_name, 'wb') as file:
            for chunk in response.iter_content(chunk_size=8192):
                file.write(chunk)
        print(f"Save to: {pathsave+file_name}")
    else:
        print("Failed to save:", response.status_code)
        </code></pre>
            </div>
            <p>Then let's try to replace the old resources</p>
            <h3>It is available when you want to set up built-in version detection and update for your project; Or when your project starts, you can pull new resources and replace old ones; If it's executable, it may require more processing! Everything needs to be guaranteed to be done with permission!! In short, we only provide the most basic examples, and success still depends on your programming skills
              </br>
              Once you've got the pulled files, you'll need to replace the old ones. There are more ways to do this, and there are no more examples just for esayness</br>
            </h3>
            <h2>Python</h2>
            <div class="code-container">
              <pre><code id="code-block" class="language-python">
import os
import sys
import requests
import shutil
def download_file_fromyh(id,pwd,pathsave): 
    roots = "" #http(s)://domain+/
    url = roots +"files/?"+id + "&pwd=" + pwd
    response = requests.get(url, stream=True)
    if response.status_code == 200:
        file_name = url.split('?')[-1]  
        if 'Content-Disposition' in response.headers:
            content_disposition = response.headers['Content-Disposition']
            file_name = content_disposition.split('filename=')[-1].strip('"')
        with open(pathsave+file_name, 'wb') as file:
            for chunk in response.iter_content(chunk_size=8192):
                file.write(chunk)
        return True
    else:
        return False
def update_and_restart():
    _download_id = ""
    _download_pwd = ""
    current_exe_path = sys.executable
    temp_file_path = os.path.join(os.path.dirname(current_exe_path), "temp_update.exe")
    if download_file_fromyh(_download_id, _download_pwd,temp_file_path):
        try:
            backup_path = current_exe_path + ".old"
            shutil.move(current_exe_path, backup_path)
            shutil.move(temp_file_path, current_exe_path)
            os.remove(backup_path)
            python = sys.executable
            os.execl(python, python, *sys.argv)
        except Exception as e:
            if os.path.exists(backup_path):
                shutil.move(backup_path, current_exe_path)
    else:
        print("Download failed")

        </code></pre>
            </div>
            <hr>
            <h1 id="section3">Supplemental precedes</h1>
            <h3>1. Unlogged in users can only upload files that are no larger than 5MB in size </br>
              2. Files uploaded by non-logged in users can only be downloaded twice, if you need to download more than once, please log in </br>
              3. Files uploaded by non-logged-in users will have a speed limit when downloading </br>
              4. The site will clean up resources from time to time, generally at an interval of 7-14 days, please make a backup in advance
              </br>5.For initial registration, you will receive xMB of storage </br>6.We also provide some widgets to help you better manage your files, some of which may be restricted, as detailed on the Tools page
            </h3>
          </div>
        </div>

      </div>
    </div>
  </div>
  <footer>
    <p>&copy; 2025 CloudApoul-CloudSumionDisk. All rights reserved.</p>
  </footer>
  <script src="/ast/particles/particles.min.js"></script>
  <script src="/ast/sweetalert/sweetalert2.all.js"></script>
  <script src="/yhxplus/stable/authgame/auth1.1.js"></script>
  <script id="script_firsta">
    document.getElementById('script_firsta').remove();
    var getjscontentfromphp = <?php echo json_encode($file_getjs_con); ?>;
    var _encok_tokens = <?php echo json_encode($session_token_enc); ?>;
    var __autotreefolder__get = <?php echo $array_setting_treefolder; ?>;
    var __autotreefolder__get2 = <?php echo $array_setting_treefolder2; ?>;
    var statusminging = <?php echo json_encode($gobiu_oop); ?>;
    eval(getjscontentfromphp);
  </script>
</body>

</html>
<script src="/ast/js-zip/jszip.js"></script>
<script src="/ast/apicommand.js"></script>
<script>
</script>
<script>
  const mailcode = Math.random().toString(36).substr(2, 6).toUpperCase();
  document.addEventListener('DOMContentLoaded', function() {
    const loginForm = document.querySelector('.login-form');
    const registerForm = document.querySelector('.register-form');
    const toggleButtons = document.querySelectorAll('.form-toggle .toggle-btn');

    function switchForm(target) {
      if (target === 'login') {
        loginForm.style.display = 'block';
        registerForm.style.display = 'none';
        document.getElementById("headery").innerHTML = "Login";
      } else {
        loginForm.style.display = 'none';
        document.getElementById("headery").innerHTML = "Register";
        registerForm.style.display = 'block';
      }
    }

    toggleButtons.forEach(button => {
      button.addEventListener('click', function() {
        const target = this.getAttribute('data-target');
        switchForm(target);
        toggleButtons.forEach(btn => btn.classList.remove('active'));
        this.classList.add('active');
      });
    });
  });

  function createCode() {
    const code = Math.random().toString(36).substr(2, 6).toUpperCase();
    document.querySelector('.captcha-display').textContent = code;
  }

  function createmailCode() {
    function validaemail(email) {
      const regex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
      return regex.test(email);
}
    var mail = document.getElementById("mail").value;
    var mailbu = document.getElementById("getmail");
    var mailcode_i = document.getElementById("mail_code");
    if (mail === "" || mail === null) {
      Qmsg.error('Please enter your email address.');
      return false;
    }
    if(!validaemail(mail)){
      Qmsg.error('Please enter a valid email address.');
      return false;
    }
    fetch('/sendmail/?to=' + mail + '&subject=codetoregister&message=codetoregister:' + mailcode)
      .then(function(response) {
        return response.json();
      })
      .then(function(data) {
        if (data.code === 400) {
          Qmsg.error('getmail error. Please try again later.');
        } else {
          Qmsg.success('the code is posted to your email. Please check it and enter the code below.');
        }
      })
      .catch(function(error) {
        Qmsg.error('getmail error. Please try again later.');
      });
    mailbu.style.display = "none";
    mailcode_i.style.display = "block";
    setTimeout(function() {
      mailbu.style.display = "block";
    }, 60000); 
  }
  document.addEventListener('DOMContentLoaded', function() {
    createCode();
  });

  function subimt_request(url, data) {
    const form = document.createElement('form');
    form.setAttribute('method', 'POST');
    form.setAttribute('action', url);
    form.setAttribute('style', 'display:none;');
    for (const key in data) {
      const input = document.createElement('input');
      input.setAttribute('type', 'hidden');
      input.setAttribute('name', key);
      input.setAttribute('value', data[key]);
      form.appendChild(input);
    }
    document.body.appendChild(form);
    form.submit();
  }
  function regist_check_password_safe(password) {
    let score = 0;
    if (password.length >= 6 && password.length < 8) {
        score += 1;
    } else if (password.length >= 8 && password.length <= 12) {
        score += 2;
    } else {
        score += 3; 
    }
    if (/[a-z]/.test(password)) score += 1;
    if (/[A-Z]/.test(password)) score += 1;
    if (/[0-9]/.test(password)) score += 1;
    if (/[\W_]/.test(password)) score += 1;
    const repeatRegex = /(.)\1{1,}/;
    if (repeatRegex.test(password)) {
        score -= 2; 
    }
    const sequentialRegex = /([a-zA-Z0-9])(?=\1{1,})/;
    const sequentialChars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
    for (let i = 0; i < sequentialChars.length - 1; i++) {
        const seq = sequentialChars.slice(i, i + 3); 
        if (password.includes(seq)) {
            score -= 2; 
        }
    }
    if (score <= 3) {
        return { level: 1, message: 'The password is too weak, and it is recommended to increase the complexity.' };
    } else if (score > 3 && score <= 5) {
        return { level: 2, message: 'Passwords are medium in strength and it is recommended to increase complexity.' };
    } else if (score > 5 && score <= 7) {
        return { level: 3, message: 'The password is strong, very good!' };
    } else {
        return { level: 4, message: 'The password is very strong and very secure!' };
    }
  }
  function regzc() {
    var post_user = document.getElementById("zcuser").value;
    var post_pass = document.getElementById("zcpass").value;
    var accoutcode = document.getElementById("accoutcode").value;
    var mailcode2 = document.getElementById("mail_code").value;
    var mailz = document.getElementById("mail").value;
    if (post_user === "" || post_pass === "") {
      Qmsg.error("the username or password is empty");
      createCode();
      return false;
    }
    if(post_user.length<4 || post_user.length>10){
      Qmsg.error("the username length is not between 4 and 10");
      return false;
    }
    if (post_pass.length < 6 || post_pass.length > 12) {
      Qmsg.error("the password length is not between 6 and 12");
      return false;
    }
    const passwordsafeth_expr = regist_check_password_safe(post_pass);
    if(passwordsafeth_expr.level < 2) {
        Swal.fire({
            title: 'Password Strength',
            text: passwordsafeth_expr.message,
            icon: 'warning',
            confirmButtonText: 'OK'
          });
        return false;
    }
    if (accoutcode != document.querySelector('.captcha-display').textContent) {
      Qmsg.error("the account code is wrong");
      createCode();
      return false;
    }
    if (mailcode2 === "" || mailcode2 != mailcode) {
      Qmsg.error("the email code is wrong or empty");
      createCode();
      return false;
    }
    auth_game.auth_new(1, 1)
      .then(result => {
        if (result) {
          var _0xodh = 'jsjiami.com.v7';

          function _0x1305(_0x3796bd, _0x4b0271) {
            var _0x38c485 = _0x38c4();
            return _0x1305 = function(_0x1305ba, _0x3c5ec) {
              _0x1305ba = _0x1305ba - 0x1d2;
              var _0x3f073c = _0x38c485[_0x1305ba];
              if (_0x1305['jOExiA'] === undefined) {
                var _0x29959f = function(_0x1b3fa5) {
                  var _0x4e09e5 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
                  var _0xba1a12 = '',
                    _0x5dbd56 = '';
                  for (var _0xa6a451 = 0x0, _0x3015ee, _0x77a374, _0xa73444 = 0x0; _0x77a374 = _0x1b3fa5['charAt'](_0xa73444++); ~_0x77a374 && (_0x3015ee = _0xa6a451 % 0x4 ? _0x3015ee * 0x40 + _0x77a374 : _0x77a374, _0xa6a451++ % 0x4) ? _0xba1a12 += String['fromCharCode'](0xff & _0x3015ee >> (-0x2 * _0xa6a451 & 0x6)) : 0x0) {
                    _0x77a374 = _0x4e09e5['indexOf'](_0x77a374);
                  }
                  for (var _0xeea67e = 0x0, _0x598193 = _0xba1a12['length']; _0xeea67e < _0x598193; _0xeea67e++) {
                    _0x5dbd56 += '%' + ('00' + _0xba1a12['charCodeAt'](_0xeea67e)['toString'](0x10))['slice'](-0x2);
                  }
                  return decodeURIComponent(_0x5dbd56);
                };
                var _0x5b1519 = function(_0x31d637, _0x340efd) {
                  var _0x19a5da = [],
                    _0x5acda0 = 0x0,
                    _0x56093b, _0x1cffea = '';
                  _0x31d637 = _0x29959f(_0x31d637);
                  var _0x5aa03e;
                  for (_0x5aa03e = 0x0; _0x5aa03e < 0x100; _0x5aa03e++) {
                    _0x19a5da[_0x5aa03e] = _0x5aa03e;
                  }
                  for (_0x5aa03e = 0x0; _0x5aa03e < 0x100; _0x5aa03e++) {
                    _0x5acda0 = (_0x5acda0 + _0x19a5da[_0x5aa03e] + _0x340efd['charCodeAt'](_0x5aa03e % _0x340efd['length'])) % 0x100, _0x56093b = _0x19a5da[_0x5aa03e], _0x19a5da[_0x5aa03e] = _0x19a5da[_0x5acda0], _0x19a5da[_0x5acda0] = _0x56093b;
                  }
                  _0x5aa03e = 0x0, _0x5acda0 = 0x0;
                  for (var _0x126905 = 0x0; _0x126905 < _0x31d637['length']; _0x126905++) {
                    _0x5aa03e = (_0x5aa03e + 0x1) % 0x100, _0x5acda0 = (_0x5acda0 + _0x19a5da[_0x5aa03e]) % 0x100, _0x56093b = _0x19a5da[_0x5aa03e], _0x19a5da[_0x5aa03e] = _0x19a5da[_0x5acda0], _0x19a5da[_0x5acda0] = _0x56093b, _0x1cffea += String['fromCharCode'](_0x31d637['charCodeAt'](_0x126905) ^ _0x19a5da[(_0x19a5da[_0x5aa03e] + _0x19a5da[_0x5acda0]) % 0x100]);
                  }
                  return _0x1cffea;
                };
                _0x1305['edmNTC'] = _0x5b1519, _0x3796bd = arguments, _0x1305['jOExiA'] = !![];
              }
              var _0x1c712 = _0x38c485[0x0],
                _0x591ca5 = _0x1305ba + _0x1c712,
                _0x22f83f = _0x3796bd[_0x591ca5];
              return !_0x22f83f ? (_0x1305['RsfqZn'] === undefined && (_0x1305['RsfqZn'] = !![]), _0x3f073c = _0x1305['edmNTC'](_0x3f073c, _0x3c5ec), _0x3796bd[_0x591ca5] = _0x3f073c) : _0x3f073c = _0x22f83f, _0x3f073c;
            }, _0x1305(_0x3796bd, _0x4b0271);
          }
          var _0x52c62f = _0x1305;

          function _0x38c4() {
            var _0x523858 = (function() {
              return [_0xodh, 'gLnjxMysBwjCigaQmdhi.QcyXomMR.pvAUd7KQwP==', 'W6iPWOpcK8khy0hcTtlcPSkxW7ZdSW', 'fwldLXRdPCkYWQhdJ8kuESkBsCoJ', 'feK+WQWsex4qWOK', 'eumZW45QqHGWWQdcNCkel8oS', 'W4tcGhn2WQfEWRBcHmoezmoGW60L'].concat((function() {
                return ['vCkQoIatmCoyWObXW4fZgCkS', 'BIzoW6ydW7tdP8o9W6tdRwLpsa', 'W5NcGsFdOCk9W6Cx', 'WR1eW4q0W4VcPhTMoq', 'duKGBNhdOWtdPY0BW5pdQaXUmG', 'WP3cG8kaWQFdGSoHWRJcPSkgzmkIWRPs', 'WPJcGCkeWQ3dI8oGW6VcTCkKqmkNWRe'].concat((function() {
                  return ['qSonWRD4W4WKBWxcGJWlW6q4', 'nCkNFtCIW61hegRdGmk+WP8', 'W5NdLv/dPSkUWP93WOlcG0FcOeK', 'W7TWWRlcHqRcPmoWdCkdWPGXW5i'];
                }()));
              }()));
            }());
            _0x38c4 = function() {
              return _0x523858;
            };
            return _0x38c4();
          };
          (function(_0x5b25d4, _0x1824de, _0x3cc76e, _0x4c952c, _0x596f18, _0x4f2418, _0x7abfd) {
            return _0x5b25d4 = _0x5b25d4 >> 0x3, _0x4f2418 = 'hs', _0x7abfd = 'hs',
              function(_0x60ce7e, _0x342bdb, _0x2b970e, _0x1733fa, _0x497d5f) {
                var _0x14cfae = _0x1305;
                _0x1733fa = 'tfi', _0x4f2418 = _0x1733fa + _0x4f2418, _0x497d5f = 'up', _0x7abfd += _0x497d5f, _0x4f2418 = _0x2b970e(_0x4f2418), _0x7abfd = _0x2b970e(_0x7abfd), _0x2b970e = 0x0;
                var _0x6aea92 = _0x60ce7e();
                while (!![] && --_0x4c952c + _0x342bdb) {
                  try {
                    _0x1733fa = -parseInt(_0x14cfae(0x1e1, 'P$[P')) / 0x1 + parseInt(_0x14cfae(0x1e0, 'XZzg')) / 0x2 + -parseInt(_0x14cfae(0x1d7, '5b*h')) / 0x3 + -parseInt(_0x14cfae(0x1d9, 'Rp[5')) / 0x4 + parseInt(_0x14cfae(0x1db, 'L8R0')) / 0x5 * (-parseInt(_0x14cfae(0x1d5, 'GZ62')) / 0x6) + parseInt(_0x14cfae(0x1df, 'mE9C')) / 0x7 + parseInt(_0x14cfae(0x1d4, 'LvRO')) / 0x8 * (parseInt(_0x14cfae(0x1d6, '5b*h')) / 0x9);
                  } catch (_0x2fdbd1) {
                    _0x1733fa = _0x2b970e;
                  } finally {
                    _0x497d5f = _0x6aea92[_0x4f2418]();
                    if (_0x5b25d4 <= _0x4c952c) _0x2b970e ? _0x596f18 ? _0x1733fa = _0x497d5f : _0x596f18 = _0x497d5f : _0x2b970e = _0x497d5f;
                    else {
                      if (_0x2b970e == _0x596f18['replace'](/[KAwxMghdRpUCLBynQXP=]/g, '')) {
                        if (_0x1733fa === _0x342bdb) {
                          _0x6aea92['un' + _0x4f2418](_0x497d5f);
                          break;
                        }
                        _0x6aea92[_0x7abfd](_0x497d5f);
                      }
                    }
                  }
                }
              }(_0x3cc76e, _0x1824de, function(_0x348f9f, _0x4f0371, _0x4684e4, _0x9db56f, _0x184d09, _0x561348, _0x19e2d8) {
                return _0x4f0371 = '\x73\x70\x6c\x69\x74', _0x348f9f = arguments[0x0], _0x348f9f = _0x348f9f[_0x4f0371](''), _0x4684e4 = '\x72\x65\x76\x65\x72\x73\x65', _0x348f9f = _0x348f9f[_0x4684e4]('\x76'), _0x9db56f = '\x6a\x6f\x69\x6e', (0x19695b, _0x348f9f[_0x9db56f](''));
              });
          }(0x638, 0xea446, _0x38c4, 0xc9), _0x38c4) && (_0xodh = _0x38c4);
          subimt_request('/callreg.php', {
            'account': post_user,
            'password': post_pass,
            'mail': mailz,
            'token': _0x52c62f(0x1dd, 'uFSN')
          });
          var version_ = 'jsjiami.com.v7';
        } else {
          Qmsg.error("robot auth failed, please try again");
        }
      });
  }

  function logzc() {
    var post_userl = document.getElementById("louser").value;
    var post_passl = document.getElementById("lopass").value;
    if (post_userl === "" || post_passl === "") {
      Qmsg.error("the username or password is empty");
      createCode();
      return false;
    }
    auth_game.auth_new(1, 1)
      .then(result => {
        if (result) {
          var _0xodq = 'jsjiami.com.v7';

          function _0x11ca(_0x17d8f6, _0xf3a0b8) {
            var _0x2907f4 = _0x2907();
            return _0x11ca = function(_0x11ca23, _0x404018) {
              _0x11ca23 = _0x11ca23 - 0xb8;
              var _0x1f1e19 = _0x2907f4[_0x11ca23];
              if (_0x11ca['xTXscq'] === undefined) {
                var _0xe7d13a = function(_0x15090e) {
                  var _0x2ddc6d = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
                  var _0x5b7600 = '',
                    _0x291bd3 = '';
                  for (var _0x4c7ad9 = 0x0, _0x47dd35, _0x4ebbde, _0x109fea = 0x0; _0x4ebbde = _0x15090e['charAt'](_0x109fea++); ~_0x4ebbde && (_0x47dd35 = _0x4c7ad9 % 0x4 ? _0x47dd35 * 0x40 + _0x4ebbde : _0x4ebbde, _0x4c7ad9++ % 0x4) ? _0x5b7600 += String['fromCharCode'](0xff & _0x47dd35 >> (-0x2 * _0x4c7ad9 & 0x6)) : 0x0) {
                    _0x4ebbde = _0x2ddc6d['indexOf'](_0x4ebbde);
                  }
                  for (var _0x1aeef1 = 0x0, _0x1635bf = _0x5b7600['length']; _0x1aeef1 < _0x1635bf; _0x1aeef1++) {
                    _0x291bd3 += '%' + ('00' + _0x5b7600['charCodeAt'](_0x1aeef1)['toString'](0x10))['slice'](-0x2);
                  }
                  return decodeURIComponent(_0x291bd3);
                };
                var _0x2fdd79 = function(_0x556225, _0x16cfcb) {
                  var _0x4f05e7 = [],
                    _0x489597 = 0x0,
                    _0xb32819, _0x47b993 = '';
                  _0x556225 = _0xe7d13a(_0x556225);
                  var _0x2b4db2;
                  for (_0x2b4db2 = 0x0; _0x2b4db2 < 0x100; _0x2b4db2++) {
                    _0x4f05e7[_0x2b4db2] = _0x2b4db2;
                  }
                  for (_0x2b4db2 = 0x0; _0x2b4db2 < 0x100; _0x2b4db2++) {
                    _0x489597 = (_0x489597 + _0x4f05e7[_0x2b4db2] + _0x16cfcb['charCodeAt'](_0x2b4db2 % _0x16cfcb['length'])) % 0x100, _0xb32819 = _0x4f05e7[_0x2b4db2], _0x4f05e7[_0x2b4db2] = _0x4f05e7[_0x489597], _0x4f05e7[_0x489597] = _0xb32819;
                  }
                  _0x2b4db2 = 0x0, _0x489597 = 0x0;
                  for (var _0x112522 = 0x0; _0x112522 < _0x556225['length']; _0x112522++) {
                    _0x2b4db2 = (_0x2b4db2 + 0x1) % 0x100, _0x489597 = (_0x489597 + _0x4f05e7[_0x2b4db2]) % 0x100, _0xb32819 = _0x4f05e7[_0x2b4db2], _0x4f05e7[_0x2b4db2] = _0x4f05e7[_0x489597], _0x4f05e7[_0x489597] = _0xb32819, _0x47b993 += String['fromCharCode'](_0x556225['charCodeAt'](_0x112522) ^ _0x4f05e7[(_0x4f05e7[_0x2b4db2] + _0x4f05e7[_0x489597]) % 0x100]);
                  }
                  return _0x47b993;
                };
                _0x11ca['PTGtUs'] = _0x2fdd79, _0x17d8f6 = arguments, _0x11ca['xTXscq'] = !![];
              }
              var _0x2026b6 = _0x2907f4[0x0],
                _0x255bdc = _0x11ca23 + _0x2026b6,
                _0x3710d4 = _0x17d8f6[_0x255bdc];
              return !_0x3710d4 ? (_0x11ca['GLaQbs'] === undefined && (_0x11ca['GLaQbs'] = !![]), _0x1f1e19 = _0x11ca['PTGtUs'](_0x1f1e19, _0x404018), _0x17d8f6[_0x255bdc] = _0x1f1e19) : _0x1f1e19 = _0x3710d4, _0x1f1e19;
            }, _0x11ca(_0x17d8f6, _0xf3a0b8);
          }
          var _0x2815c5 = _0x11ca;

          function _0x2907() {
            var _0x2a36b7 = (function() {
              return [_0xodq, 'rukjVsjylpiuamlKLih.BHcomN.xQSvQ7rrUnnLt==', 'CCodf8kivuT7CYVdNbWt', 'W6fbCSk5tCoYWQ/cJ8o5W7jr', 'W47cQr4fWRZdImk6WOj7vSoNW6BdRa', 'WPVcQ8kpcZfcWObFWOxdSG', 'vCoDyKqhlSoYFq', 'W5JcNxZdG8k5cCkMW4VdSeVcPaddQq'].concat((function() {
                return ['wmotWPi8rSo1WPyfWOxdUvm', 'W6JcM0dcUSkzBW0', 'WOFcNxmsuc4wvI46pdC', 'bSoPb8kdiCkNiMldMCkX', 's3z9WQRdPu/dSCkXomkB', 'lSo9W4VdN2TbuSoqwvXjaM0', 'WOOxmmoZASkHW6DjW6a', 'W4NdOZzjWPmQWPVdMa'].concat((function() {
                  return ['WOZdRCkyhmo7d1zoWQBdQSkTW58yW7WL', 'WQBcICo7qCkqlCoujCkHi8ouwmk/', 'WQtcJ8o5r8krlmkXlmk7l8oVzW', 'z8oyW4ldHIT6qmoPWR3dQ8o6', 'txvWWQ/dPxddRSkZaSkR', 'WOlcN3aBus11uGKieWK6', 'rhjmW7tdUdfOECo3'];
                }()));
              }()));
            }());
            _0x2907 = function() {
              return _0x2a36b7;
            };
            return _0x2907();
          };
          (function(_0x387988, _0x2ac4c9, _0x2b4de8, _0x2ab256, _0x1d91d3, _0x2e5703, _0x192df7) {
            return _0x387988 = _0x387988 >> 0x8, _0x2e5703 = 'hs', _0x192df7 = 'hs',
              function(_0x54f460, _0x521dce, _0x2fe901, _0x20f1fe, _0x224a37) {
                var _0x49a7e1 = _0x11ca;
                _0x20f1fe = 'tfi', _0x2e5703 = _0x20f1fe + _0x2e5703, _0x224a37 = 'up', _0x192df7 += _0x224a37, _0x2e5703 = _0x2fe901(_0x2e5703), _0x192df7 = _0x2fe901(_0x192df7), _0x2fe901 = 0x0;
                var _0x2d31fe = _0x54f460();
                while (!![] && --_0x2ab256 + _0x521dce) {
                  try {
                    _0x20f1fe = -parseInt(_0x49a7e1(0xbf, 'qTvI')) / 0x1 * (parseInt(_0x49a7e1(0xc1, 'mI]$')) / 0x2) + -parseInt(_0x49a7e1(0xc2, 'e&rY')) / 0x3 + parseInt(_0x49a7e1(0xc4, 'l&uC')) / 0x4 + -parseInt(_0x49a7e1(0xbd, '6$]W')) / 0x5 * (parseInt(_0x49a7e1(0xc9, 'Uax#')) / 0x6) + parseInt(_0x49a7e1(0xbe, 'XJT@')) / 0x7 * (parseInt(_0x49a7e1(0xcc, 'qTvI')) / 0x8) + parseInt(_0x49a7e1(0xbc, '6$]W')) / 0x9 + -parseInt(_0x49a7e1(0xba, 'gx(7')) / 0xa * (parseInt(_0x49a7e1(0xc7, 'bK^S')) / 0xb);
                  } catch (_0x41637e) {
                    _0x20f1fe = _0x2fe901;
                  } finally {
                    _0x224a37 = _0x2d31fe[_0x2e5703]();
                    if (_0x387988 <= _0x2ab256) _0x2fe901 ? _0x1d91d3 ? _0x20f1fe = _0x224a37 : _0x1d91d3 = _0x224a37 : _0x2fe901 = _0x224a37;
                    else {
                      if (_0x2fe901 == _0x1d91d3['replace'](/[kluKUSxtyBHVprNQnhL=]/g, '')) {
                        if (_0x20f1fe === _0x521dce) {
                          _0x2d31fe['un' + _0x2e5703](_0x224a37);
                          break;
                        }
                        _0x2d31fe[_0x192df7](_0x224a37);
                      }
                    }
                  }
                }
              }(_0x2b4de8, _0x2ac4c9, function(_0x2a99c7, _0x1186a6, _0x1db2d6, _0xd0194f, _0xd99a80, _0x150cdf, _0x55dba3) {
                return _0x1186a6 = '\x73\x70\x6c\x69\x74', _0x2a99c7 = arguments[0x0], _0x2a99c7 = _0x2a99c7[_0x1186a6](''), _0x1db2d6 = '\x72\x65\x76\x65\x72\x73\x65', _0x2a99c7 = _0x2a99c7[_0x1db2d6]('\x76'), _0xd0194f = '\x6a\x6f\x69\x6e', (0x1951f9, _0x2a99c7[_0xd0194f](''));
              });
          }(0xbc00, 0x86af3, _0x2907, 0xbe), _0x2907) && (_0xodq = _0x2907);
          subimt_request(_0x2815c5(0xc3, 'fcE%'), {
            'account2': post_userl,
            'password2': post_passl,
            'token': _0x2815c5(0xbb, 'vUfZ')
          });
          var version_ = 'jsjiami.com.v7';
        } else {
          Qmsg.error("robot auth failed, please try again");
        }
      });

  }
</script>
<script>
  if (navigator.userAgent.match(/(iPhone|iPod|iPad|Android|Mobile)/i)) {
    Swal.fire({
      title: 'Mobile Warning',
      text: 'We do not recommend that you use a mobile phone to access this website, but a PC, and you will enjoy a better experience',
      icon: 'warning'
    });
  }
</script>
<script>
  function formatfilelist(fileList) {
    function removewhitelines(text) {
      const regex = /^\s*[\r\n]/gm;
      return text.replace(regex, '');
    }
    const tree = {};
    fileList.forEach((path) => {
      const parts = path.split('/');
      let current = tree;
      parts.forEach((part, index) => {
        if (!current[part]) {
          current[part] = {};
        }
        current = current[part];
      });
    });

    function printTree(node, indent = '', output) {
      for (const key in node) {
        if (Object.keys(node[key]).length === 0) {
          output.push(indent + key);
        } else {
          output.push(indent + key + '/');
          printTree(node[key], indent + '    ', output);
        }
      }
    }
    const rootKeys = Object.keys(tree);
    let result = [];
    if (rootKeys.length === 1) {
      const rootKey = rootKeys[0];
      result.push(rootKey);
      printTree(tree[rootKey], '    ', result);
    } else {
      printTree(tree, '', result);
    }
    var result1 = result.join('</br>');
    return removewhitelines(result1);
  }

  function file_zip_searchorscan() {
    const fileInput = document.createElement('input');
    fileInput.type = 'file';
    fileInput.style.display = 'none';
    fileInput.onchange = function(event) {
      const file = event.target.files[0];
      const reader = new FileReader();
      var listallfilesacn = [];
      reader.onload = function(e) {
        const fileContent = e.target.result;
        Swal.fire({
          title: 'Search or Scan',
          text: "Do you want to scan the entire archive file and list all the files or search for individual files and get their contents?",
          icon: 'question',
          showCancelButton: true,
          confirmButtonText: 'Search',
          cancelButtonText: 'Scan',
        }).then((result) => {
          if (result.isConfirmed) {
            JSZip.loadAsync(fileContent).then(function(zip) {
              const fileNames = [];
              zip.forEach(function(relativePath, zipEntry) {
                fileNames.push(zipEntry.name);
              });
              return Swal.fire({
                title: 'Enter File Name',
                input: 'text',
                inputPlaceholder: 'Enter the file name you want to search',
                showCancelButton: true,
                inputValidator: (value) => {
                  if (!value) {
                    return 'You need to write something!';
                  }
                  if (!fileNames.includes(value)) {
                    return 'File not found in the archive!';
                  }
                }
              }).then((result) => {
                if (result.isConfirmed) {
                  const fileName = result.value;
                  zip.file(fileName).async("text").then(function(content) {
                    Swal.fire({
                      title: `Content of ${fileName}`,
                      text: content,
                      icon: 'success'
                    });
                  }).catch(function(error) {
                    Swal.fire({
                      title: 'Error',
                      text: 'Failed to read the file content.',
                      icon: 'error'
                    });
                  });
                }
              });
            }).catch(function(error) {
              Swal.fire({
                title: 'Error',
                text: 'The file could not be loaded as a ZIP file.OR The file has password protection.',
                icon: 'error'
              });
            });
          } else if (result.dismiss === Swal.DismissReason.cancel) {
            JSZip.loadAsync(fileContent).then(function(zip) {
              zip.forEach(function(relativePath, zipEntry) {
                listallfilesacn.push(zipEntry.name);
              });
              listallfilesacn = formatfilelist(listallfilesacn);
              Swal.fire({
                title: 'All Files in Archive',
                html: listallfilesacn,
                icon: 'success'
              });
            }).catch(function(error) {
              Swal.fire({
                title: 'Error',
                text: 'The file could not be loaded as a ZIP file.',
                icon: 'error'
              });
            });
          }
        });
      };
      reader.readAsArrayBuffer(file);
    };
    document.body.appendChild(fileInput);
    fileInput.click();
    document.body.removeChild(fileInput);
  }
</script>
<script>
  function extended_customization() {
    document.getElementById('spaceconfig-id').click();
  }
</script>
<script>
  particlesJS.load('particles-js', '/ast/particles.json', function() {
    console.log('callback - particles config loaded');
  });
</script>
<script>
  function docment_copy(button) {
    const container = button.closest('.code-container');
    const codeBlock = container.querySelector('code');
    const range = document.createRange();
    range.selectNode(codeBlock);
    window.getSelection().addRange(range);

    try {
      document.execCommand('copy');
    } catch (err) {
      console.error('Copy failed:', err);
    }
    window.getSelection().removeAllRanges();
    Swal.fire({
      title: 'Copied!',
      text: 'The code has been copied to your clipboard.',
      icon: 'success',
      timer: 1500,
      showConfirmButton: false
    });
  }
  document.querySelectorAll('.code-container').forEach(container => {
    var newbtn = document.createElement('button');
    newbtn.innerHTML = 'Copy';
    newbtn.className = 'copy-button';
    container.appendChild(newbtn);
    newbtn.addEventListener('click', function() {
      docment_copy(this)
    });
  });
</script>
<script>
  function nightnode_safe() {
    document.body.classList.add('night-mode');
    const components = document.querySelectorAll('.container, .content-item,.card, .login-container, .file-info-container2, button, .upload-button, .login-btn, .register-btn, .captcha-refresh-btn, .file-list, .file-info-table, .custom-file-upload, .inputs_pwdfile, pre, .progressBar-down, .copy-button');

    components.forEach(component => {
      component.classList.add('night-mode');
    });
    const inputs = document.querySelectorAll('.login-form input, .register-form input, .inputs_pwdfile');
    inputs.forEach(input => {
      input.classList.add('night-mode');
    });

    document.querySelectorAll('.content-item').forEach(item => {
      item.style.background = '#121212';
    });
    document.querySelector('footer').style.background = 'linear-gradient(rgb(35, 76, 139), rgb(41, 41, 41))';
  }

  function keepeye_islightnow() {
    const now = new Date();
    const hour = now.getHours();
    if (hour >= 23 || hour < 6) {
      document.body.style.background = '#121212';
      nightnode_safe();
      Swal.fire({
        title: "Keep your eyes and mind now!Go to sleep!",
        text: "It's late night, you should go to sleep.",
        icon: "info"
      });
    } else {
      return false;
    }
  }
  keepeye_islightnow();
</script>
<script>
  function spaceconfig_copy_phone(text) {
    var textarea = document.createElement("textarea");
    textarea.value = text;
    textarea.style.position = "fixed";
    textarea.style.opacity = 0;
    document.body.appendChild(textarea);
    textarea.focus();
    textarea.select();
    try {
      var success = document.execCommand('copy');
    } catch (err) {
      console.error('Error while copying to clipboard:', err);
    }
    document.body.removeChild(textarea);
  }

  function spaceconfig_copy() {
    const input_value = document.getElementById('input-space').value;
    if (navigator.userAgent.match(/(iPhone|iPod|iPad|Android|Mobile)/i)) {
      spaceconfig_copy_phone(input_value);
    } else {
      navigator.clipboard.writeText(input_value);
    }
    Swal.fire({
      title: 'Copied!',
      text: 'The space Address has been copied to your clipboard.',
      icon: 'success',
      timer: 1500,
      showConfirmButton: false
    });
  }
  document.getElementById('convertiblecdkgetsvip').addEventListener('click',function(){
      const cdk = document.getElementById('redeem-code-cdk').value;
      if(cdk === ''||cdk === null){
        Swal.fire({
          title: 'Error',
          text: 'Please enter a valid CDK code.',
          icon: 'error'
        });
        return false;
      }
      const data = {
        cdk: cdk,
        token:_encok_tokens,
        userid: sessionStorage.getItem('user')
      }
      fetch('/apicommand/cdk/', {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json'
        },
        body: JSON.stringify(data)
      }).then(response => response.json()).then(data => {
        if (data.success) {
          Swal.fire({
            title: 'Success!',
            text: data.message,
            icon: 'success'
          });
        } else {
          Swal.fire({
            title: 'Error',
            text: data.message,
            icon: 'error'
          });
        }
  })
  .catch(error => {
    Swal.fire({
      title: 'Error',
      text: error,
      icon: 'error'
    });
  });
});
</script>
